<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			推荐使用写法二和写法三。
			// 写法一
			const clone1 = {
			  __proto__: Object.getPrototypeOf(obj),
			  ...obj
			};
			
			// 写法二
			const clone2 = Object.assign(
			  Object.create(Object.getPrototypeOf(obj)),
			  obj
			);
			
			// 写法三
			const clone3 = Object.create(
			  Object.getPrototypeOf(obj),
			  Object.getOwnPropertyDescriptors(obj)
			)
		</script>
	</body>
</html>
